﻿using System.ComponentModel;
using Loki.Utils;

namespace Loki.UI
{
    public class ConfirmViewModel : ModalViewModel
    {
        #region  Message
        private static PropertyChangedEventArgs _MessageChangedArgs = ObservableHelper.CreateChangedArgs<ConfirmViewModel>(x => x.Message);

        private static PropertyChangingEventArgs _MessageChangingArgs = ObservableHelper.CreateChangingArgs<ConfirmViewModel>(x => x.Message);

        private string _Message;

        public string Message
        {
            get
            {
                return _Message;
            }

            set
            {
                if (value != _Message)
                {
                    NotifyChanging(_MessageChangingArgs);
                    _Message = value;
                    NotifyChanged(_MessageChangedArgs);
                }
            }
        }
        #endregion

        public static ConfirmViewModel Confirm(string P_Test, params object[] P_Params)
        {
            ConfirmViewModel L_Dialog = new ConfirmViewModel();
            L_Dialog.Message = string.Format(P_Test, P_Params);
            return L_Dialog;
        }
    }
}
